package com.tensquare.search.dao;

import com.tensquare.search.pojo.Article;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

/**
 * @author 11752
 */
public interface ArticleDao extends ElasticsearchRepository<Article,String> {

    /**
     * 根据关键字在标题或者内容中查找
     * @param title 标题
     * @param content 内容
     * @param pageable 分页器
     * @return 数据
     */
    Page<Article> findByTitleOrContentLike(String title, String content, Pageable pageable);

}
